package a03.core.base;

import java.util.List;

/**
 * @author : scottxuan
 */
public interface BaseService<T> {

    int insert(T record);

    int insertSelective(T record);

    Integer insertUseGeneratedKeys(T record);

    int insertBatch(List<T> records);

    int updateByPrimaryKey(T record);

    int updateByPrimaryKeySelective(T record);

    T selectByPrimaryKey(Object id);

    List<T> selectByPrimaryKeys(List<?> ids);

    T selectOneByRecord(T record);

    List<T> selectByRecord(T record);

    int deleteByPrimaryKey(Object id);

    int deleteByPrimaryKeys(List<?> ids);

    int logicDeleteByPrimaryKey(Object id);

    int logicDeleteByPrimaryKeys(List<?> ids);
}
